package com.fhz.shop.ui.search;

import androidx.lifecycle.ViewModel;

import com.fhz.shop.entity.SearchBean;

import java.util.List;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;

/**
 * 时间:2023/9/1
 *
 * @author Mr.Feng
 * 简述: TODO
 */
@HiltViewModel
public class SearchViewModel extends ViewModel {

    @Inject
    SearchRepository mSearchRepository;

    @Inject
    public SearchViewModel() {
    }

    public void insert(SearchBean... searchBean){
        mSearchRepository.insert(searchBean);
    }

    public List<SearchBean> queryAll(){
        return mSearchRepository.queryAll();
    }

    public void delete(SearchBean searchBean){
        mSearchRepository.delete(searchBean);
    }
}
